
{% extends  'base/front_base.html' %}
{% load news_filters %}


{% block title %}
    小饭桌搜索
{% endblock %}

{% block head %}
    <link rel="stylesheet" href="{% static 'css/search/search.min.css' %}">
    <script src="{% static 'js/index.min.js' %}"></script>
{% endblock %}

{% block main %}
    <div class="main">
        <div class="wrapper">
            <div class="main-content-wrapper">
                <div class="search-group">
                    <form action="">
                        <input type="text" class="left" name="q" placeholder="请输入关键词">
                        <input type="submit" class="right" value="搜索">
                    </form>
                </div>
                <div class="recommend-group">
                    <span class="recommend-title">搜索结果</span>
                    <div class="recommend-list">
                        <ul class="hot-content">
                            {% for news in newses %}
                                <li>
                                <div class="thumbnail-group">
                                    <img src="{{ news.thumbnail }}" alt="">
                                </div>
                                <div class="news-group">
                                    <p class="title">{{ news.title }}</p>
                                    <p class="desc">{{ news.desc }}</p>
                                    <div class="more">
                                        <div class="left-more">
                                            <span>{{ news.category }}</span>
                                        </div>
                                        <div class="right-more">
                                            <span class="author">{{ news.author.username }}</span>
                                            <span class="pub-time">{{ news.pub_time|time_since }}</span>
                                        </div>
                                    </div>
                                </div>
                            </li>
                            {% endfor %}

                        </ul>
                    </div>
                </div>
            </div>
            {% include 'base/sidebar.html' %}
        </div>
    </div>
{% endblock %}